package com.norbitltd.guavaleaves.java.lang;

import com.google.common.base.Predicate;

public class ThreadPredictates {

	public static Predicate<Thread> isAlive() {
		return new Predicate<Thread>() {
			public boolean apply(Thread input) {
				return input.isAlive();
			}
		
		};
	}
	
	public static Predicate<Thread> isDaemon() {
		return new Predicate<Thread>() {
			public boolean apply(Thread input) {
				return input.isDaemon();
			}
		
		};
	}
	
	public static Predicate<Thread> isInterrupted() {
		return new Predicate<Thread>() {
			public boolean apply(Thread input) {
				return input.isInterrupted();
			}
		
		};
	}
}
